<?php

/**
 * Created by PhpStorm.
 * User: dung
 * Date: 3/26/14
 * Time: 10:55 AM
 */
class SC_Paginator
{
    public function createPaginator($totalItem, $arrPaginator, $option = null)
    {
        $adapter = new Zend_Paginator_Adapter_Null($totalItem);
        $paginator = new Zend_Paginator($adapter);
        $paginator->setItemCountPerPage($arrPaginator['itemCountPerPage']);
        $paginator->setPageRange($arrPaginator['pageRange']);
        $paginator->setCurrentPageNumber($arrPaginator['currentPage']);
        return $paginator;
    }
} 